<template>
  <div class="follow-item" :style="`border:1px solid ${color}`">
    <svg-icon :name="name"></svg-icon>
    <div class="info" :title="account">{{ account }}</div>
    <div class="text" :style="`background:${color}`">
      {{ text }}
    </div>
  </div>
</template>
<script setup>
defineProps({
  name: {
    type: String,
  },
  color: {
    type: String,
  },
  account: {
    type: String,
  },
  text: {
    type: String,
  },
});
</script>
<style lang="scss" scoped>
.follow-item {
    font-size: 12px;
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  :deep svg {
    margin:0 10px 0 5px;
    vertical-align: -4px;
  }
  border-radius: 5px;
  &:hover {
    .text {
        width: 80px;
    }
  }
  .info {
    cursor: pointer;
    margin-right: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space:nowrap;
    &:hover {
        color:$strong;
    }
  }
  .text {
    font-size: 12px;
    width: 60px;
    position: absolute;
    right:0;
    height: 100%;
    color:#fff;
    line-height: 40px;
    text-align: center;
    transition:width .5s ease;
  }
}
</style>
